with IO; use IO;
with Interfaces; use Interfaces;

package PS is



   type PS_System_Header is
      record
         -- start code start
         Start_Code : Byte_Array(1..4) := (0, 0, 1, 16#bb#);
         Header_Length : Word_16 := 0;
         Rate_Bound : Unsigned_22 := 0;
         Audio_Bound : Unsigned_6 := 0;
         CSPS : Bit_Type := 0;
         System_Audio_Lock_Flag : Bit_Type := 0;
         System_Video_Lock_Flag : Bit_Type := 0;
         Video_Bound : Unsigned_6 := 0;
         Packet_Rate_Restriction_Flag : Bit_Type := 0;

      end record;

   type PS_Pack_Header is
      record
         -- start code start
         Start_Code : Byte_Array(1..4) := (0, 0, 1, 16#ba#);
         SCR : Unsigned_32 := 0; -- should be 33 bits
         SCR_Ext : Byte_Type := 0; -- should be 9 bits
         Programe_Mux_Rate : Unsigned_22 := 0;
         Pack_Stuffing_Length : Unsigned_3 := 0;
      end record;
end PS;